unit uUser;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Input2, Grids, DBGrids, KDBGrid, StdCtrls, Mask, DBCtrls,
  KDBEdit, DB, ImgList,
  ComCtrls, ToolWin, Buttons, ExtCtrls, KLookUp, ADODB;

type
  TfrmUser = class(TfrmInput2)
    KDBEdit4: TKDBEdit;
    KDBEdit1: TKDBEdit;
    KDBEdit2: TKDBEdit;
    KDBEdit3: TKDBEdit;
    KDBEdit6: TKDBEdit;
    KDBEdit5: TKDBEdit;
    KDBEdit7: TKDBEdit;
    KDBGrid1: TKDBGrid;
    qMasterUSRCODE: TWideStringField;
    qMasterUSRNAME: TWideStringField;
    qMasterUSRLOG: TWideStringField;
    qMasterUSRPASS: TWideStringField;
    qMasterUSRSTS: TWideStringField;
    qMasterDEPCODE: TWideStringField;
    qMasterDEPNAME: TWideStringField;
    qDetailUSRCODE: TWideStringField;
    qDetailSTSCODE: TWideStringField;
    qDetailSTSLEV: TWideStringField;
    Label1: TLabel;
    Label2: TLabel;
    procedure qDetailBeforePost(DataSet: TDataSet);
  private
   protected
    function GetParamValue: String; override;
    function ListRefreshData: TCustomKLookUp; override;

    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmUser: TfrmUser;

implementation

uses uDataModule, Input1;

{$R *.dfm}


function TfrmUser.GetParamValue: String;
begin
        Result := DataModule1.qUserUSRCODE.AsString;
end;

function TfrmUser.ListRefreshData: TCustomKLookUp;
begin
        Result := DataModule1.ListUser;
end;

procedure TfrmUser.qDetailBeforePost(DataSet: TDataSet);
begin
  inherited;
      //  if qMaster.State = Insert then
      //  begin
                qDetailUSRCODE.AsString := qMasterUSRCODE.AsString;
      //  end;
end;

end.
